package com.ysx.oa.teacher.service.impl;


import com.ysx.oa.teacher.bean.TeacherBean;
import com.ysx.oa.teacher.dao.TeacherDao;
import com.ysx.oa.teacher.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    private TeacherDao dao;

    @Override
    public TeacherBean findById(Integer id) {
        TeacherBean bean = new TeacherBean();
        bean.setId(id);
        return dao.selectOne(bean);
    }

    @Override
    public int add(TeacherBean bean) {
        return dao.insert(bean);
    }
}
